Repository navigation
Conversation
The TPC-H and TPC-DS dataset caches were keyed on the hash of pr_build_linux.yml, so every workflow edit regenerated both datasets and left useless entries that evict main's. The generators were also unpinned: GenTPCHData cloned tpch-dbgen HEAD and the tpcds-kit checkout had no ref, so a generator change could not rotate a dataset key. Pin both generators and key the datasets on their inputs instead: - TPC-H key is the hash of GenTPCHData.scala; the generator now checks out a fixed tpch-dbgen commit before applying the stdout patch. - TPC-DS key embeds the pinned tpcds-kit commit, which the checkout now names explicitly. Save both from main only, matching the cache-write policy for other large caches. check_tpc_dataset_caches() in dev/ci/check-ci-config.py asserts all of the above so the old shape cannot come back.
sunchao
left a comment
There was a problem hiding this comment.
Summary
- Prior state and problem: Workflow edits invalidated both TPC datasets, and generator revisions were not fully pinned.
- Design approach: Pin both generators, key datasets on generator inputs, and save caches only from
main. - Correctness / compatibility analysis: Both pins match current upstream heads. Checked Spark’s generator sources for supported versions 3.4.3, 3.5.9, 4.0.4, 4.1.3, and 4.2.0. No introduced P1/P2 issues found within this review.
- Key design decisions: Explicit restore/save steps fit the existing cache policy. The change adds no query-runtime overhead or new abstraction layer.
- Implementation sketch: Updates two workflow caches, pins
GenTPCHDatabefore applying its existing stdout patch, and adds configuration checks. - Behavioral changes worth calling out: Unrelated workflow edits retain cached data. PR and queue runs restore caches but regenerate on misses without saving.
- Suggested improvements: None meeting the P1/P2 reporting threshold.
Reviewed the full three-file diff from 9a4d5f28368d4fbb54ac23c14c5d52d5637ce26d to fb6260914e170276ec0bd87d105bbafdbfcc572e. Confirmed non-draft status. Read the discussion snapshot and live reviews/comments/threads, all empty. Routed skill: review-comet-pr; no sibling skill applies.
Exact-head CI: label passed. Comet CI, CodeQL, and Check PR Title report action_required. Comet CI has no executed jobs, so there is no build/test verdict.
Local validation passed: CI configuration checks, suite registration, workflow actionlint, and the new guard’s five expected failures against base fixtures. Both pinned data generators compiled, and bounded SF=1 stdout tests produced expected row counts. Full Maven/native builds, Spark Parquet generation, benchmark query suites, and hosted cache restore/save behavior were not executed. The project working tree remains unchanged.
|
This is a light fully automated review since there are so many PRs open. The restore/save split matches the existing Maven cache pattern well.
The new keys at |
The TPC-H and TPC-DS dataset caches were keyed on the hash of pr_build_linux.yml, so every workflow edit regenerated both datasets and left useless entries that evict main's. The generators were also unpinned: GenTPCHData cloned tpch-dbgen HEAD and the tpcds-kit checkout had no ref, so a generator change could not rotate a dataset key. Pin both generators and key the datasets on their inputs instead: - TPC-H key is the hash of GenTPCHData.scala; the generator now checks out a fixed tpch-dbgen commit before applying the stdout patch. - TPC-DS key embeds the pinned tpcds-kit commit, which the checkout now names explicitly. Save both from main only, matching the cache-write policy for other large caches. check_tpc_dataset_caches() in dev/ci/check-ci-config.py asserts all of the above so the old shape cannot come back.
Keep the verified refreshed tree while retaining the published head as an ancestor, allowing a normal push without rewriting history.
|
Updated against pinned main Scale factor and partition count now come from the same job inputs used by actual generator arguments, restore/save cache keys, and dataset/query paths. Pinned generators, exact-match dataset restores, main-only saves and upstream Cargo policy are retained. The workflow README now describes this behavior accurately. Verification on Apollo:
Limitations: the local TPC-H build used Updated head: TPC-DS follow-upTPC-DS follow-up: a sandbox-only PR source remains unchanged. Local generator patch and compiler compatibility flags were required; unmodified hosted-workflow compatibility and full TPC-DS/query suites remain unverified. Current-main diff correctionBoth intended commits were rebased onto Current-base input/mutation checks (15), CI/suite guards, benchmark checker (55 suites), inventory/summary tests and workflow formatting checks passed. Previous TPC-H and patched-local TPC-DS runtime evidence remains tied to the earlier source/base and its recorded compatibility overrides, not a new-base runtime or hosted-cache claim. Updated head: |
|
Rechecked the current head ( Fresh runs of The current Comet CI and CodeQL runs are awaiting approval, so there is no current-head hosted build/test verdict yet. Could a maintainer approve those runs? |
Preserve generator-keyed TPC caches alongside upstream suite removals and CI routing changes without rewriting the PR history. Refs apache#6112
|
Merged current main ( Fresh local checks passed: CI configuration, suite inventory, versioned-source parity, benchmark runner (60 suites), Iceberg shard inventory (15 tests), and write-summary checks (6 tests). This is static/configuration validation, not a fresh TPC generation, cache-runtime, or hosted test result. The Comet CI and CodeQL runs for this exact head require maintainer approval. Could a maintainer approve them? |
|
Updated head: Validated on Apollo against current
Not rerun: actual TPC generation and hosted cache behavior. CI and CodeQL are still |
comphead
left a comment
There was a problem hiding this comment.
Exact-key restores with main-only saves and no restore-keys mean a pull request or fork cannot restore a stale dataset or poison the cache, and both generator pins match the current upstream heads. One comment on what the TPC-H key covers. Separately, this conflicts with #6113 in dev/ci/check-ci-config.py, where both append a check after check_cache_save_scope, so whichever lands second needs a small rebase.
| with: | ||
| path: ./tpch | ||
| key: tpch-${{ hashFiles('.github/workflows/pr_build_linux.yml') }} | ||
| key: tpch-sf${{ env.TPC_SCALE_FACTOR }}-p${{ env.TPC_NUM_PARTITIONS }}-${{ hashFiles('spark/src/test/scala/org/apache/spark/sql/GenTPCHData.scala') }} |
There was a problem hiding this comment.
The key hashes only GenTPCHData.scala, but the generated data also depends on TPCH.scala, which holds Dbgen (it builds the ./dbgen -q ... -T <table> -s <sf> command line) and TPCHTables (the schemas). A change there would still hit the cache and run the queries on the old dataset, which is the failure this PR removes. Could the key hash TPCH.scala too, here and in the save key at line 796? For TPC-DS, GenTPCDSData and TPCDSTables come from Spark's spark-sql tests jar at the default profile's spark.version, so a Spark bump does not rotate that key either. Is that intended?
…0261013 # Conflicts: # dev/ci/check-ci-config.py
|
Merged current The only conflict was Verification on the merged head: GitHub now reports the PR mergeable with the approval retained. Ready for re-review. |
Closes #6102.
The TPC-H and TPC-DS dataset caches were keyed on
hashFiles('.github/workflows/pr_build_linux.yml'), so any workflow editregenerated both datasets and left entries that a later run can never restore.
The generators were also unpinned:
GenTPCHDataclonedtpch-dbgenHEAD andthe
tpcds-kitcheckout had noref:.This pins both generators and keys the datasets on their inputs:
GenTPCHData.scala; the generator checks out a fixedtpch-dbgencommit before applying the stdout patch.tpcds-kitcommit, which the checkout namesexplicitly.
actions/cache/restoreplus a save step guarded tomain, matching the cache-write policy used for other large caches.check_tpc_dataset_caches()indev/ci/check-ci-config.pyasserts the keyshape, the pinned
ref:, and that the TPC caches are no longer bareactions/cache@vN.Testing: the new guard fails on the previous revision with five findings and
passes after the change (
CI config checks passed);dev/ci/check-suites.pyalso passes.